class Animal {
    public String name;
    public int age;

    public void eat() {
        System.out.println(name+"正在吃饭");
    }
}
class Dog extends Animal{
    //子类  关键字  父类
    //派生类       基类/超类
    public void wang() {
        System.out.println(name+"正在叫");
    }
}
class Cat extends Animal{
    public void miao() {
        System.out.println(name+"正在miaomiao叫");
    }
}

public class Test3 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.name = "tanke";
        dog.eat();
        dog.wang();

        Cat cat = new Cat();
        cat.name = "xiaomi";
        cat.eat();
        cat.miao();
    }
}
